home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / DAYFIRST.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  49 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _DayFirst( dDate ) --> dFirstDay
  8.  
  9. PARAMETERS:
  10.  
  11. dDate : Date from which first day of month is to be derived
  12.  
  13. SHORT:
  14.  
  15. Return the DATE of the first day of the month in date passed.
  16.  
  17. DESCRIPTION:
  18.  
  19. _DayFirst() returns the DATE on which the month in dDate began.  If the date
  20. 03/22/93 is passed to the function, it returns 03/01/93.
  21.  
  22. This is very simple, but it might be useful during leap years since it does
  23. respect them.
  24.  
  25. If dDate is NOT a valid date type, _DayFirst returns an empty date.
  26.  
  27. This is another of those functions that I once had a need for, but forgot
  28. what it was.  It essentially just returns mm/01/yy for any given date passed.
  29.  It can be useful when you want to "keep it clean" as in:
  30.  
  31. dRangeLow = _DayFirst(date())
  32. dRangeHi  = _DayLast(date())
  33.  
  34. This way you do not have to do all the substring manipulation every time you
  35. want the month begin date of the current (or specified) date.  This is just
  36. cleaner and easier on the eye.
  37.  
  38. NOTE:
  39.  
  40.  
  41.  
  42. EXAMPLE:
  43.  
  44. t = _DayFirst( ctod('03/22/93') )
  45.  
  46. Result: (t == ctod('03/01/93') ) = TRUE
  47.  
  48. ******************************************************************************/
  49.